package com.utcs.modules.resource.basic.entity;

import com.utcs.common.persistence.DataEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Fly on 2017/5/26.
 */
public class Role extends DataEntity<Role> {

    private static final long serialVersionUID = 1L;
    private Department department;	// 归属部门
    private String name; 	// 角色名称
    private String enname;	// 英文名称
    private String roleType;// 权限类型
    private String dataScope;// 数据范围

    private String sysData; 		//是否是系统数据
    private String useable; 		//是否是可用

    private User user;		// 根据用户ID查询角色列表

    //	private List<User> userList = Lists.newArrayList(); // 拥有用户列表
    private List<Menu> menuList = new ArrayList<>(); // 拥有菜单列表
    private List<Department> departmentList = new ArrayList<Department>(); // 按明细设置数据范围



    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEnname() {
        return enname;
    }

    public void setEnname(String enname) {
        this.enname = enname;
    }

    public String getRoleType() {
        return roleType;
    }

    public void setRoleType(String roleType) {
        this.roleType = roleType;
    }

    public String getDataScope() {
        return dataScope;
    }

    public void setDataScope(String dataScope) {
        this.dataScope = dataScope;
    }

    public String getSysData() {
        return sysData;
    }

    public void setSysData(String sysData) {
        this.sysData = sysData;
    }

    public String getUseable() {
        return useable;
    }

    public void setUseable(String useable) {
        this.useable = useable;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<Menu> getMenuList() {
        return menuList;
    }

    public void setMenuList(List<Menu> menuList) {
        this.menuList = menuList;
    }

    public List<Department> getDepartmentList() {
        return departmentList;
    }

    public void setDepartmentList(List<Department> departmentList) {
        this.departmentList = departmentList;
    }

    @Override
    public String toString() {
        return "Role{" +
                "department=" + department +
                ", name='" + name + '\'' +
                ", enname='" + enname + '\'' +
                ", roleType='" + roleType + '\'' +
                ", dataScope='" + dataScope + '\'' +
                ", sysData='" + sysData + '\'' +
                ", useable='" + useable + '\'' +
                '}';
    }
}
